<template>
    <div id="app" :class="showTabBar ? 'tab-bar' : ''">
        <keep-alive>
            <router-view v-if="$route.meta.isKeepAlive"></router-view>
        </keep-alive>
        <router-view v-if="!$route.meta.isKeepAlive"></router-view>
        <tab-bar v-if="showTabBar"></tab-bar>
        <ipx-block></ipx-block>
    </div>
</template>

<script>
    import TabBar from './components/tab-bar'

    export default {
        name: 'MobileApp',
        components: {
            TabBar,
        },
        computed: {
            showTabBar() {
                if (window.__wxjs_environment === 'miniprogram') {
                    return false
                }
                return this.$route.meta.tabBar
            }
        }
    }
</script>
<style lang="scss">
</style>
